DISCUSSION
You should call the
ATSUGetIndFontName to iterate through the entries of a font name table. If you want to find the index and name of the first font in a name table with a particular font name code, language, platform, and script, call the function
ATSUFindFontFromName. If you want to find the ID of the first font in a font name table with a particular font name code, language, platform, and script, call the function
ATSUFindFontName.
The best way to use
ATSUGetIndFontName is to call it twice:
-
Pass the ID of the font whose name table you want to iterate in the iFontID parameter, NULL for the oName parameter, and 0 for the other parameters. ATSUGetIndFontName returns the length of the font name string in the oActualNameLength parameter.
-
Allocate enough space for a font name buffer of the returned size, then call the function again, passing a pointer in the oName parameter; on return, the pointer references the font name string.